package com.orhon.smartcampus.modules.student.mm;



import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.student.entity.Operating;
import com.orhon.smartcampus.modules.student.gqlModel.GQLOperating;

@Mapper(
        uses = {
                LangMapper.class
        }
)
public interface OperatingMapper {


    OperatingMapper MAPPER = Mappers.getMapper(OperatingMapper.class);


    @Mapping(source = "id",target = "id")
    @Mapping(source = "student_id",target = "student_id")
    @Mapping(source = "content",target = "content")
    @Mapping(source = "user_id",target = "user_id")
    @Mapping(source = "user_name",target = "user_name")
    @Mapping(source = "operate",target = "operate")
    @Mapping(source = "created_at",target = "created_at")
    GQLOperating toOperating(Operating entity);
    
    @InheritConfiguration(name = "toOperating")
    List<GQLOperating> toOperatingList(List<Operating> entities);
}
